package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	InquiryFeedbackStatusEventNew           = "erp.InquiryFeedbackStatusNew"
	InquiryFeedbackStatusEventBeforeCreate  = "erp.InquiryFeedbackStatusBeforeCreate"
	InquiryFeedbackStatusEventBeforeUpdate  = "erp.InquiryFeedbackStatusBeforeUpdate"
	InquiryFeedbackStatusEventBeforeSave    = "erp.InquiryFeedbackStatusBeforeCreate erp.InquiryFeedbackStatusBeforeUpdate"
	InquiryFeedbackStatusEventAfterCreate   = "erp.InquiryFeedbackStatusAfterCreate"
	InquiryFeedbackStatusEventAfterUpdate   = "erp.InquiryFeedbackStatusAfterUpdate"
	InquiryFeedbackStatusEventAfterSave     = "erp.InquiryFeedbackStatusAfterCreate erp.InquiryFeedbackStatusAfterUpdate"
	InquiryFeedbackStatusEventDelete        = "erp.InquiryFeedbackStatusDelete"
	InquiryFeedbackStatusAccessControlEvent = "erp.InquiryFeedbackStatusAccessControl"
)

func GetInquiryFeedbackStatusConfig() *mgo.DocConfig {
	return InquiryFeedbackStatus_Config
}

var InquiryFeedbackStatus_Config *mgo.DocConfig

func init() {
	InquiryFeedbackStatus_Config = NewInquiryFeedbackStatusConfig()
}
func NewInquiryFeedbackStatusConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "erp.InquiryFeedbackStatus",
		Fields: []string{
			"name", "sort", "l", "r", "level", "link", "parent", "children", "color", "background", "group", "step", "warn",
		},
		RelationFields: []string{
			"parent", "children",
		},
		RelationConfigs: map[string]*mgo.DocRelation{
			"parent": {
				Config:     GetInquiryFeedbackStatusConfig,
				DocName:    "InquiryFeedbackStatus",
				JoinType:   "O",
				KeyInside:  "parentId",
				KeyOutSide: "id",
			},
			"children": {
				Config:     GetInquiryFeedbackStatusConfig,
				DocName:    "InquiryFeedbackStatus",
				JoinType:   "M",
				KeyInside:  "id",
				KeyOutSide: "parentId",
			},
		},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
